export default {
  state: {
    userInfo: {},
  },
  getters: {
    getUserInfo(state) {
      return state.userInfo;
    },
  },
  mutations: {
    setUserInfo(state, params) {
      state.userInfo = params;
    },
    asyncSetUserInfo(state, params) {
      state.userInfo = params;
    },
  },
  actions: {
    asyncSet({ commit }, params) {
      setTimeout(() => {
        commit("asyncSetUserInfo", params);
      }, 2000);
    },
  },
};
